home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-05-27 | 838 b | 34 lines | [TEXT/ttxt] |
- {
- Copyright 1997 by Capilano Computing Systems Ltd.
-
- Script to prompt for a Part code for the selected devices.
- First, turn off report generation.
- }
- $REPORTOFF
- $PROGRESS $OFF
- {
- Find selected devices and pretend they're sorted so we can merge all values
- in the Part field into one.
- }
- $FIND $DEVICES $SELECTED
- $SORT $DEVICES $RAW
- $COMBDEVSON
- {
- If nothing's selected, quit
- }
- $IF($EQ($DEVCOUNT, 0))
- $ALERT1(No devices are selected!)
- $ABORT
- $END
- {
- If we have more than one value in the selected devices, use an empty initial value
- }
- $DEVICES$SETVAR(_GPCB_Part, $IF($EQ($COUNTVALUES(&Part), 1))&Part$END)
- {
- Put up a prompt box. Note that we abort if the user presses Cancel
- }
- $SETVAR(_GPCB_Part, $PROMPT2(Enter part name for selected devices, &_GPCB_Part))
- {
- Set the Part in all devices.
- }
- $DEVICES$SETATTR(Part, &_GPCB_Part)